<template>
	<view class="page-index">
		<view class="look-box" v-for="(item,index) in look" :key="index" @click="gocompany(item.member_id)">
			<view class="look-left">
				<view class="name">
					{{item.company.name}}
				</view>
				<view class="value">
					{{item.company.scale}} · {{item.company.nature}}
				</view>
			</view>
			<view class="look-right">
				<image :src="item.company.logo" mode=""></image>
			</view>
		</view>
		
	</view>
</template>

<script>
	import * as news from '@/api/news.js'
	export default {
		data() {
			return {
				look:[],
				form:{
					page:1,
					pages:20
				}
			}
		},
		onLoad(){
			this.resumeBrowseList()
		},
		onPullDownRefresh() {
			this.form.page =1
			this.look = []
			this.resumeBrowseList()
		},
		onReachBottom() {
			this.form.page += 1
			this.resumeBrowseList()
		},
		methods: {
			resumeBrowseList(){
				news.resumeBrowseList(this.form).then(res=>{
					this.look.push(...res.data.data)
				})
			},
			gocompany(member_id){
				this.$tools.navigate(`/pages/home/companyInfo/index?member_id=${member_id}`)
			}
		}
	}
</script>

<style scoped lang="scss">
.page-index{
	.look-box{
		margin-top: 10rpx;
		display: flex;
		justify-content: space-between;
		background: #ffffff;
		padding: 20px 40rpx;
		.look-left{
			display: flex;
			flex-direction: column;
			justify-content: space-between;
		}
		.look-right{
			flex-shrink: 0;
			image{
				border-radius: 50%;
				width: 100rpx;
				height: 100rpx;
			}
		}
	}
}
</style>
